Step of Proof: fast-fib
11,40
postcript
pdf
Inference at
*
1
2
I
of proof for Lemma
fast-fib
:
1.
n
:
2. 0 <
n
3.
a
,
b
:
.
3.
{
m
:
|
3. {
k
:
.
3. {
(
a
= fib(
k
))
((
k
0)
(
b
= 0))
((0 <
k
)
(
b
= fib(
k
- 1)))
(
m
= fib((
n
- 1)+
k
))}
4.
a
:
5.
b
:
{
m
:
|
{
k
:
.
{
(
a
= fib(
k
))
((
k
0)
(
b
= 0))
((0 <
k
)
(
b
= fib(
k
- 1)))
(
m
= fib(
n
+
k
))}
latex
by (InstHypEval
a
+
b
`z'
z
3)
CollapseTHENA ((Try ((Complete (Auto'))
))
)
latex
C
1
:
C1:
6.
b1
:
.
C1: 6.
{
m
:
|
C1: 6. {
k
:
.
C1: 6. {
(
a
+
b
= fib(
k
))
C1: 6. {
((
k
0)
(
b1
= 0))
C1: 6. {
((0 <
k
)
(
b1
= fib(
k
- 1)))
C1: 6. {
(
m
= fib((
n
- 1)+
k
))}
C1:
{
m
:
|
C1:
{
k
:
.
C1:
{
(
a
= fib(
k
))
((
k
0)
(
b
= 0))
((0 <
k
)
(
b
= fib(
k
- 1)))
(
m
= fib(
n
+
k
))}
C
.
Definitions
n
+
m
,
f
(
a
)
,
has-value(
a
)
,
callbyvalue(
a
;
x
.
B
(
x
))
,
s
=
t
,
n
-
m
,
,
A
B
,
A
,
False
,
Void
,
a
<
b
,
fib(
n
)
,
#$n
,
P
Q
,
x
:
A
.
B
(
x
)
,
x
:
A
B
(
x
)
,
t
T
,
,
{
x
:
A
|
B
(
x
)}
Lemmas
le
wf
,
nat
wf
,
fib
wf
origin